﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="BankDataImporterFactory.cs" company="Concept Architecture">
//   (c) 2010 Muhammad Umer Farooq
// </copyright>
// <summary>
//   Defines the <seealso cref="BankDataImporterFactory" /> type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Hisaab.Business.Parser
{
    using System;

    using Hisaab.Client.Common;

    /// <summary>
    /// Defines the <seealso cref="BankDataImporterFactory"/> type.
    /// </summary>
    public static class BankDataImporterFactory
    {
        /// <summary>
        /// Creates the parser.
        /// </summary>
        /// <param name="bank">The bank.</param>
        /// <returns>Parser for bank</returns>
        public static IBankDataParser CreateParser(Banks bank)
        {
            switch (bank)
            {
                case Banks.NatWest:
                    return new NatwestDataParser();
                case Banks.Barclays:
                    return new BarclaysDataParser();
                case Banks.Hsbc:
                    return new HsbcDataParser();
                case Banks.Lloyds:
                    return new LloydsDataParser();
                case Banks.Rbs:
                    return new RbsDataParser();
                default:
                    throw new ArgumentOutOfRangeException("bank");
            }
        }
    }
}